//
//  DataCompareAxisValueFormatter.swift
//  MoyoungHome
//
//  Created by 李然 on 2022/9/17.
//

import UIKit
import Charts

open class DataCompareAxisValueFormatter: NSObject, IAxisValueFormatter {
    
    public let axisValueArray:[String]
    
   public init(axisValueArray:[String]){
        self.axisValueArray = axisValueArray
        super.init()
    }
    
    public func stringForValue(_ value: Double, axis: AxisBase?) -> String {
        let index = Int(Int(value) % self.axisValueArray.count)
        return self.axisValueArray[index]
    }
}



